

function addSensorbitCod(Blockly) {




    //水深传感器模块
    Blockly.Python.microbit_waterdeep = function(block) {
        var dropdown_waterdeep = this.getFieldValue('waterdeep');
        Blockly.Python.definitions_['import_microbit'] = 'from microbit import *';
        Blockly.Python.definitions_['import_water'] = 'from sensor import water';
        var code = "water.get_depth("+ dropdown_waterdeep +")";
        return [code];
      }

    return Blockly;
}

module.exports = addSensorbitCod;

